<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.20"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>JCSDK Objective-C API Reference for iOS/macOS: JCNet类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">JCSDK Objective-C API Reference for iOS/macOS
   &#160;<span id="projectnumber">2.3.3</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.20 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">构造函数</a> &#124;
<a href="#pub-static-methods">类方法</a> &#124;
<a href="#properties">属性</a> &#124;
<a href="interface_j_c_net-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">JCNet类 参考<div class="ingroups"><a class="el" href="group___xE7_xBD_x91_xE7_xBB_x9C_xE6_xA8_xA1_xE5_x9D_x97.html">网络模块</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#import &lt;<a class="el" href="_j_c_net_8h_source.html">JCNet.h</a>&gt;</code></p>
<div class="dynheader">
类 JCNet 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="interface_j_c_net.png" alt=""/>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
构造函数</h2></td></tr>
<tr class="memitem:ac3eb3cbf151aad1a729f708cad3451ba"><td class="memItemLeft" align="right" valign="top">(void)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_j_c_net.html#ac3eb3cbf151aad1a729f708cad3451ba">addCallback:</a></td></tr>
<tr class="separator:ac3eb3cbf151aad1a729f708cad3451ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab2cebd485e4df1825c0e4c22f3ea60f9"><td class="memItemLeft" align="right" valign="top">(void)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_j_c_net.html#ab2cebd485e4df1825c0e4c22f3ea60f9">removeCallback:</a></td></tr>
<tr class="separator:ab2cebd485e4df1825c0e4c22f3ea60f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
类方法</h2></td></tr>
<tr class="memitem:a69265fd6368189303c6c95a6da6d78bb"><td class="memItemLeft" align="right" valign="top">(<a class="el" href="interface_j_c_net.html">JCNet</a> *)&#160;</td><td class="memItemRight" valign="bottom">+ <a class="el" href="interface_j_c_net.html#a69265fd6368189303c6c95a6da6d78bb">shared</a></td></tr>
<tr class="separator:a69265fd6368189303c6c95a6da6d78bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="properties"></a>
属性</h2></td></tr>
<tr class="memitem:af96696b6c4bdab20b29c7ad4a4d70eca"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___xE7_xBD_x91_xE7_xBB_x9C_xE6_xA8_xA1_xE5_x9D_x97.html#gaaebe0c8c917fd3a40d69894a7951e916">JCNetType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_j_c_net.html#af96696b6c4bdab20b29c7ad4a4d70eca">netType</a></td></tr>
<tr class="separator:af96696b6c4bdab20b29c7ad4a4d70eca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeeca5291bee62e0325b51b5ab65bd0ed"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_j_c_net.html#aeeca5291bee62e0325b51b5ab65bd0ed">hasNet</a></td></tr>
<tr class="separator:aeeca5291bee62e0325b51b5ab65bd0ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>网络类 </p>
</div><h2 class="groupheader">函数文档</h2>
<a id="ac3eb3cbf151aad1a729f708cad3451ba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac3eb3cbf151aad1a729f708cad3451ba">&#9670;&nbsp;</a></span>addCallback:</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (void) addCallback: </td>
          <td></td>
          <td class="paramtype">(id&lt; <a class="el" href="protocol_j_c_net_callback-p.html">JCNetCallback</a> &gt;)&#160;</td>
          <td class="paramname"><em>callback</em></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置回调 </p><dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">callback</td><td>回调对象 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ab2cebd485e4df1825c0e4c22f3ea60f9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab2cebd485e4df1825c0e4c22f3ea60f9">&#9670;&nbsp;</a></span>removeCallback:</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (void) removeCallback: </td>
          <td></td>
          <td class="paramtype">(id&lt; <a class="el" href="protocol_j_c_net_callback-p.html">JCNetCallback</a> &gt;)&#160;</td>
          <td class="paramname"><em>callback</em></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>删除回调 </p><dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">callback</td><td>回调对象 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a69265fd6368189303c6c95a6da6d78bb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a69265fd6368189303c6c95a6da6d78bb">&#9670;&nbsp;</a></span>shared</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">+ (<a class="el" href="interface_j_c_net.html">JCNet</a>*) shared </td>
          <td></td>
          <td class="paramname"></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>单例获得 <a class="el" href="interface_j_c_net.html">JCNet</a> 实例 </p>

</div>
</div>
<h2 class="groupheader">属性说明</h2>
<a id="aeeca5291bee62e0325b51b5ab65bd0ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeeca5291bee62e0325b51b5ab65bd0ed">&#9670;&nbsp;</a></span>hasNet</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">- (BOOL) hasNet</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">read</span><span class="mlabel">nonatomic</span><span class="mlabel">assign</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>是否有网</p>
<p><a class="el" href="group___xE7_xBD_x91_xE7_xBB_x9C_xE6_xA8_xA1_xE5_x9D_x97.html#ggaaebe0c8c917fd3a40d69894a7951e916a56a22928c79ccba2cceafb58d9d69fd4">JCNetTypeUnknown</a> 认为无网</p>
<dl class="section return"><dt>返回</dt><dd><ul>
<li>true 表示有网</li>
<li>false 表示无网 </li>
</ul>
</dd></dl>

</div>
</div>
<a id="af96696b6c4bdab20b29c7ad4a4d70eca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af96696b6c4bdab20b29c7ad4a4d70eca">&#9670;&nbsp;</a></span>netType</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">- (<a class="el" href="group___xE7_xBD_x91_xE7_xBB_x9C_xE6_xA8_xA1_xE5_x9D_x97.html#gaaebe0c8c917fd3a40d69894a7951e916">JCNetType</a>) netType</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">read</span><span class="mlabel">nonatomic</span><span class="mlabel">assign</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>网络类型</p>
<ul>
<li><a class="el" href="group___xE7_xBD_x91_xE7_xBB_x9C_xE6_xA8_xA1_xE5_x9D_x97.html#ggaaebe0c8c917fd3a40d69894a7951e916ad647fc123c3c6567bc403287f3630abb">JCNetTypeUnavailable</a> : 无网</li>
<li><a class="el" href="group___xE7_xBD_x91_xE7_xBB_x9C_xE6_xA8_xA1_xE5_x9D_x97.html#ggaaebe0c8c917fd3a40d69894a7951e916acca8a0e3a5e422d9cd7d4132ce48ee71">JCNetTypeWifi</a> : Wifi</li>
<li><a class="el" href="group___xE7_xBD_x91_xE7_xBB_x9C_xE6_xA8_xA1_xE5_x9D_x97.html#ggaaebe0c8c917fd3a40d69894a7951e916a9f7f42f1e2510a0821582eafffe9d893">JCNetTypeMobile</a> : 数据网</li>
<li><a class="el" href="group___xE7_xBD_x91_xE7_xBB_x9C_xE6_xA8_xA1_xE5_x9D_x97.html#ggaaebe0c8c917fd3a40d69894a7951e916a56a22928c79ccba2cceafb58d9d69fd4">JCNetTypeUnknown</a> : 未知类型 </li>
</ul>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>JCSDKOC/JCSDKOC/JCNet/<a class="el" href="_j_c_net_8h_source.html">JCNet.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20
</small></address>
</body>
</html>
